package com.bdqn.crm.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @TableName cst_lost
 */
@TableName(value = "cst_lost")
@Data
public class CstLost implements Serializable {
    /**
     * 编号
     */
    @TableId(type = IdType.AUTO)
    private Long lstId;

    /**
     * 客户编号
     */
    private String lstCustNo;

    /**
     * 客户姓名
     */
    private String lstCustName;

    /**
     * 客户经理编号
     */
    private Long lstCustManagerId;

    /**
     * 客户经理姓名
     */
    private String lstCustManagerName;

    /**
     * 上次下单时间
     */
    private Date lstLastOrderDate;

    /**
     * 确认流失时间
     */
    private Date lstLostDate;

    /**
     * 暂缓措施
     */
    private String lstDelay;

    /**
     * 流失原因
     */
    private String lstReason;

    /**
     * 状态
     */
    private String lstStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CstLost other = (CstLost) that;
        return (this.getLstId() == null ? other.getLstId() == null : this.getLstId().equals(other.getLstId()))
                && (this.getLstCustNo() == null ? other.getLstCustNo() == null : this.getLstCustNo().equals(other.getLstCustNo()))
                && (this.getLstCustName() == null ? other.getLstCustName() == null : this.getLstCustName().equals(other.getLstCustName()))
                && (this.getLstCustManagerId() == null ? other.getLstCustManagerId() == null : this.getLstCustManagerId().equals(other.getLstCustManagerId()))
                && (this.getLstCustManagerName() == null ? other.getLstCustManagerName() == null : this.getLstCustManagerName().equals(other.getLstCustManagerName()))
                && (this.getLstLastOrderDate() == null ? other.getLstLastOrderDate() == null : this.getLstLastOrderDate().equals(other.getLstLastOrderDate()))
                && (this.getLstLostDate() == null ? other.getLstLostDate() == null : this.getLstLostDate().equals(other.getLstLostDate()))
                && (this.getLstDelay() == null ? other.getLstDelay() == null : this.getLstDelay().equals(other.getLstDelay()))
                && (this.getLstReason() == null ? other.getLstReason() == null : this.getLstReason().equals(other.getLstReason()))
                && (this.getLstStatus() == null ? other.getLstStatus() == null : this.getLstStatus().equals(other.getLstStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getLstId() == null) ? 0 : getLstId().hashCode());
        result = prime * result + ((getLstCustNo() == null) ? 0 : getLstCustNo().hashCode());
        result = prime * result + ((getLstCustName() == null) ? 0 : getLstCustName().hashCode());
        result = prime * result + ((getLstCustManagerId() == null) ? 0 : getLstCustManagerId().hashCode());
        result = prime * result + ((getLstCustManagerName() == null) ? 0 : getLstCustManagerName().hashCode());
        result = prime * result + ((getLstLastOrderDate() == null) ? 0 : getLstLastOrderDate().hashCode());
        result = prime * result + ((getLstLostDate() == null) ? 0 : getLstLostDate().hashCode());
        result = prime * result + ((getLstDelay() == null) ? 0 : getLstDelay().hashCode());
        result = prime * result + ((getLstReason() == null) ? 0 : getLstReason().hashCode());
        result = prime * result + ((getLstStatus() == null) ? 0 : getLstStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", lstId=").append(lstId);
        sb.append(", lstCustNo=").append(lstCustNo);
        sb.append(", lstCustName=").append(lstCustName);
        sb.append(", lstCustManagerId=").append(lstCustManagerId);
        sb.append(", lstCustManagerName=").append(lstCustManagerName);
        sb.append(", lstLastOrderDate=").append(lstLastOrderDate);
        sb.append(", lstLostDate=").append(lstLostDate);
        sb.append(", lstDelay=").append(lstDelay);
        sb.append(", lstReason=").append(lstReason);
        sb.append(", lstStatus=").append(lstStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}